function(script str)


  map_new()
  ans(expression_cache)
  map_set(global expression_cache ${expression_cache})
  function(script str)
    language("oocmake")
    ans(lang)
    if(NOT lang)
      #cmakepp_config(base_dir)
      #ans(base_dir)

      #language("${base_dir}/resources/expr.json")
      expr_definition()
      ans(lang)
      language("${lang}")
      ans(lang)

    endif()
    map_tryget("${lang}" md5)
    ans(language_hash)
    string(MD5 script_language_hash "${str}${language_hash}")  
    cmakepp_config(temp_dir)
    ans(temp_dir)
    set(obj_file "${temp_dir}/expressions/expr_${script_language_hash}.cmake")
    map_tryget(global expression_cache)
    ans(expression_cache)

    map_tryget(${expression_cache} "${script_language_hash}")
    ans(symbol)
    if(symbol)

    elseif(EXISTS "${obj_file}")
      include("${obj_file}")
      ans(symbol)
      map_set(${expression_cache} "${script_language_hash}" "${symbol}")
    else()
#      echo_append("compiling expression to ${obj_file} ...")
      map_new()
      ans(context)

      map_new(scope)
      ans(scope)

      map_set(${context} scope "${scope}")
      map_set(${context} cache_key "${script_language_hash}")
      set(symbol_cache_key "${script_language_hash}")
      ast("${str}" oocmake "")
      ans(ast)

      ast_eval(${ast} ${context} ${lang})
      ans(symbol)
      string(REPLACE "\"" "\\\"" escaped "${symbol}")
      string(REPLACE "$" "\\$" escaped "${escaped}")
      map_tryget(${context} code)
      ans(code)
 #     message("done")
      file(WRITE "${obj_file}" "${code}\nset(__ans \"${escaped}\")")
      if(code)
        set_ans("")
        eval("${code}")
      endif()

    endif()

  is_map("${global}" )
    ans(ismap)
    if(NOT ismap)
      map_new()
      ans(global)
    endif()
    set_ans("")
    eval("${symbol}")
    ans(res)

    if(NOT ismap)

      map_promote(${global})
    endif()
    return_ref(res)
  endfunction()
  script("${str}")
  return_ans()
endfunction()